package com.tengju.data.domain.model.clickhouse.dashboard;

import com.tengju.data.domain.shared.Month;
import com.tengju.data.domain.shared.Quarter;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
public enum MonthQuarterEnum {

    //当前年月
    CURRENT_MONTH(1, "当前年月日"),
    //当前上一个月份
    LAST_MONTH(2,"上一个月最后一天"),
    //当前季度
    CURRENT_QUARTER(3,"当前季度每个月最后一天");

    private int code;
    private String message;

    MonthQuarterEnum(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }


    public static MonthQuarterEnum getMonthQuarter(int code) {
        for (MonthQuarterEnum monthQuarterEnum : MonthQuarterEnum.values()) {
            if (monthQuarterEnum.getCode() == code) {
                return monthQuarterEnum;
            }
        }
        return null;
    }


}
